<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
    	<title>【结算】</title>
    	<link href="../customer/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
		<link href="../customer/basic/css/demo.css" rel="stylesheet" type="text/css" />
		<link href="../customer/css/cartstyle.css" rel="stylesheet" type="text/css" />
		<link href="../customer/css/jsstyle.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../customer/js/address.js"></script>
		<script type="text/javascript" src="../customer/js/pay.js"></script>
		<style type="text/css">
			.submitOrder .btn-go {
				float:right;
				border:0;
			}
			
		</style>
		
	</head>
	<body>
		<div class="concent">
		<form action="commitPaymentAction.action">
			<!--地址 -->
			<div class="paycont">
				<div class="address">
					<h3>确认收货地址 </h3>
					<div class="control">
						<div class="tc-btn createAddr theme-login am-btn am-btn-danger"><a href="addAddress.jsp">使用新地址</a></div>
					</div>
					<h3><font color="red">*<span id="checkconsigneeId"></span></font></h3>
					<div class="clear"></div>
					<s:if test="consignees.size>0">
					<ul>
						<s:iterator value="consignees" id="consignee" status="status">
							<div class="per-border"></div>
							<li class="user-addresslist">
								<s:if test="%{#status.first}">
									<input type="radio" class="consigneeId" onPropertyChange="checkconsigneeId()" name="consigneeId" value="<s:property value="#consignee.objId" />" checked/>
								</s:if> 
								<s:else>
									<input type="radio" class="consigneeId" onPropertyChange="checkconsigneeId()" name="consigneeId" value="<s:property value="#consignee.objId"/>"/>
								</s:else>
								<div class="address-left">
									<div class="user DefaultAddr">
										<span class="buy-address-detail">   
		                					 <span class="buy-user"><s:property value="#consignee.consigneeName"/></span>
											<span class="buy-phone"><s:property value="#consignee.mobilePhone"/></span>
										</span>
									</div>
									<div class="default-address DefaultAddr">
										<span class="buy-line-title buy-line-title-type">收货地址：</span>
										<span class="buy--address-detail">
								   			<span class="province"><s:property value="#consignee.province"/></span>
											<span class="city"><s:property value="#consignee.city"/></span>
											<span class="dist"><s:property value="#consignee.area"/></span>
											<span class="street"><s:property value="#consignee.detailAddress"/></span>
										</span>
									</div>
								</div>
								<div class="address-right">
									<a href="../person/address.html">
										<span class="am-icon-angle-right am-icon-lg"></span>
									</a>
								</div>
								<div class="clear"></div>
		
								<div class="new-addr-btn">
									<a href="toUpdateConsigneeViewAction.action?consigneeId=<s:property value="#consignee.objId" />">编辑</a>
									<span class="new-addr-bar">|</span>
									<a href="deleteConsigneeAction.action?consigneeId=<s:property value="#consignee.objId" />" >删除</a>
								</div>
							</li>
						</s:iterator>
					</ul>
					</s:if>
	
					<div class="clear"></div>
				</div>
	
				<!--支付方式-->
				<div class="logistics">
					<h3>选择支付方式</h3><br><br>
					<ul class="pay-list">
						<s:iterator value="paymentTypes" id="paymentType" status="status">
							<s:if test="%{#status.first}">
								<input type="radio" name="paymentTypeId" value="<s:property value="#paymentType.objId"/>" checked/><s:property value="#paymentType.typeName"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</s:if> 
							<s:else>
								<input type="radio" name="paymentTypeId" value="<s:property value="#paymentType.objId"/>"/><s:property value="#paymentType.typeName"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</s:else>
						</s:iterator>
					</ul>
				</div>
				<br><br><br><br>
				<div class="clear"></div>
	
				<!--订单 -->
				<div class="concent">
					<s:if test="seleteShoppingCarInfo.size>0">
					<div id="payTable">
						<h3>确认订单信息</h3>
						<div class="cart-table-th">
							<div class="wp">
	
								<div class="th th-item">
									<div class="td-inner">商品信息</div>
								</div>
								<div class="th th-price">
									<div class="td-inner">单价</div>
								</div>
								<div class="th th-amount">
									<div class="td-inner">数量</div>
								</div>
								<div class="th th-sum">
									<div class="td-inner">金额</div>
								</div>
							</div>
						</div>
						<div class="clear"></div>
						<tr class="item-list">
							<div class="bundle  bundle-last">
								<div class="bundle-main">
									<s:iterator value="seleteShoppingCarInfo" id="shoppingCar" status="status">
									<ul class="item-content clearfix">
										<div class="pay-phone">
											<li class="td td-item">
												<div class="item-pic">
													<a href="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId=<s:property value="#shoppingCar.furnitureInfo.objId"/>" class="J_MakePoint">
														<img src="<s:property value="#shoppingCar.furnitureInfo.picture_one"/>" class="itempic J_ItemImg"></a>
												</div>
												<div class="item-info">
													<div class="item-basic-info">
														<a href="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId=<s:property value="#shoppingCar.furnitureInfo.objId"/>" class="item-title J_MakePoint" data-point="tbcart.8.11">
															<s:property value="#shoppingCar.furnitureInfo.furnitureName"/>
														</a>
													</div>
												</div>
											</li>
											<li class="td td-info">
												<div class="item-props">
													<span class="sku-line">规格：<s:property value="#shoppingCar.furnitureInfo.description"/></span>
												</div>
											</li>
											<li class="td td-price">
												<s:property value="#shoppingCar.furnitureInfo.salePrice"/>
											</li>
										</div>
										<li class="td td-amount">
											<div class="amount-wrapper ">
												<div class="item-amount ">
													<span class="phone-title">购买数量</span>
													<div class="sl">
														<input class="min am-btn" name="" type="button" value="-" />
														<input class="text_box" name="" type="text" value=" <s:property value="#shoppingCar.count" />" style="width:30px;" />
														<input class="add am-btn" name="" type="button" value="+" />
													</div>
												</div>
											</div>
										</li>
										<li class="td td-sum">
											<div class="td-inner">
												<em tabindex="0" class="J_ItemSum number">0</em>
											</div>
										</li>
										<input name="seleteShoppingCarId" value="<s:property value="#shoppingCar.carId"/>" type="hidden">
									</ul>
									</s:iterator>
									<div class="clear"></div>
	
								</div>
						</tr>
						<div class="clear"></div>
						</div>
					</s:if>
					</div>
						<div class="pay-total">
						<!--含运费小计 -->
						<div class="buy-point-discharge ">
							<p class="price g_price">
								合计（含运费） <span>¥</span><em id="pay-sum" class="pay-sum">0</em>
							</p>
						</div>
					</div>
	
					<div class="clear"></div>
					<div class="order-go clearfix">
						<div id="holyshit269" class="submitOrder">
							<div class="go-btn-wrap">
								<div id="J_GoDiv">
									<input id="J_Go" class="btn-go" type="submit" value="提交订单" disabled="disabled">
								</div>
							</div>
						<div class="clear"></div>
					</div>
				</div>
			</form>
		</div>
		<script type="text/javascript">
			 var submitButton=document.getElementById("J_Go");
			 var checkconsigneeId = $("#checkconsigneeId");
			 checkconsigneeId.html("");
			 var consigneeId=document.getElementsByName("consigneeId");
			 
			 if(consigneeId.length==0)
			 {
				 checkconsigneeId.html("收货地址不能为空");
			 	submitButton.disabled = true;
			 }
			 else
			 {
				submitButton.disabled = false;	
			 }

		</script>
	</body>
</html>